﻿<div class="well">
    <form name="form" class="form-horizontal" role="form" ng-submit="addItem()" novalidate>
        <fieldset ng-disabled="isLoading()">
            <div class="form-group">
                <label for="itemName">Item Name</label>
                <input type="text" id="itemName" class="form-control" ng-model="item.itemName" />
            </div>
            <div class="form-group">
                <label for="itemPrice">Item Price</label>
                <input type="text" id="itemPrice" class="form-control" ng-model="item.itemPrice" />
            </div>
            <div class="form-group">
                <label for="quantity">Quantity</label>
                <input type="text" id="quantity" class="form-control" ng-model="item.quantity" />
            </div>
            <div class="form-group">
                <label for="quantity">Item Type</label>
                <select class="form-control" ng-model="selectedType"
                        ng-options="opt as opt.name for opt in itemTypes">
                </select>
            </div>
            <div ng-show="errorMessage" style="color: red;">
                {{errorMessage}}
            </div>
            <div class="form-group">
                <input type="submit" class="btn btn-primary" value="{{buttonText}}" />
            </div>
        </fieldset>
    </form>
</div>